{extend name="default/users/base" /}
{block name="title"}首页-买家中心{__block__}{/block}
{block name="css"}
<link href="__STATIC__/plugins/validator/jquery.validator.css?v={$v}" rel="stylesheet">
{/block}

{block name="content"}
<style>
    .wst-form tr>td>input[type='text']{
	width:339px;
	height:20px;
}
</style>
<div class="wst-user-head" style="margin-bottom:3px;"><span>发票管理</span></div>
<form id="invoiceForm" autocomplete="off">
    <table class='wst-form'>
        <tr>
            <th>
                发票类别<font color='red'>*</font>：
            </th>
            <td>
                <div class="radio-box">
                    <label><input type="radio" class="ipt wst-radio" id="invoiceType-1" name="invoiceType" <?=($data['invoiceType']==1)?'checked':'';?>
                        value="1" /><label class="mt-1" for="invoiceType-1"></label> 增值税专用发票</label>
                    <label><input type="radio" class="ipt wst-radio" id="invoiceType-0" name="invoiceType" <?=($data['invoiceType']==0)?'checked':'';?>
                        value="0" /><label class="mt-1" for="invoiceType-0"></label> 普通发票</label>
                </div>
            </td>
        </tr>
        <tr>
            <th width='110'>
                发票抬头<font color='red'>*</font>：
            </th>
            <td>
                <input type="text" class="ipt" id="invoiceHead" name="invoiceHead" value="{$data['invoiceHead']}"
                    placeholder="您的发票抬头" maxlength="30" />
            </td>
        </tr>

        <tr>
            <th>
                发票税号<font color='red'>*</font>：
            </th>
            <td>
                <input type="text" class="ipt" id="invoiceCode" name="invoiceCode" value="{$data['invoiceCode']}"
                    placeholder="发票税号" maxlength="20" />
            </td>
        </tr>

        <tr class="j-tax">
            <th>
                注册地址<font color='red'>*</font>：
            </th>
            <td>
                <input type="text" class="ipt" id="invoiceAddr" name="invoiceAddr" value="{$data['invoiceAddr']}"
                    placeholder="注册地址">
            </td>
        </tr>

        <tr class="j-tax">
            <th>
                注册电话<font color='red'>*</font>：
            </th>
            <td>
                <input type="text" class="ipt" id="invoicePhoneNumber" name="invoicePhoneNumber" value="{$data['invoicePhoneNumber']}"
                    placeholder="注册电话">
            </td>
        </tr>

        <tr class="j-tax">
            <th>
                开户银行<font color='red'>*</font>：
            </th>
            <td>
                <input type="text" class="ipt" id="invoiceBankName" name="invoiceBankName" value="{$data['invoiceBankName']}"
                    placeholder="开户银行">
            </td>
        </tr>
        <tr class="j-tax">
            <th>
                银行账户<font color='red'>*</font>：
            </th>
            <td>
                <input type="text" class="ipt" id="invoiceBankNo" name="invoiceBankNo" value="{$data['invoiceBankNo']}"
                    placeholder="银行账户">
            </td>
        </tr>


    </table>
    <div class="addr-btn-box">
        <input type="hidden" name="id" id="id" class="ipt" value="{$data['id']}" />
        <button type="submit" class="wst-sec-but u-btn">提交</button>
        <button type="button" onclick="javascript:history.go(-1)" class="wst-sec-but u-btn">返回</button>
    </div>
</form>
<style>
    .addr-btn-box{
	margin-left:10%;
}
.j-tax{
    display: none;
}
</style>
<script>
    var defalutInvocieType = "{$data['invoiceType']}";
    var _t = $('.j-tax');
    if (defalutInvocieType == 1) _t.show();
    $('.wst-radio').change(function () {
        if ($(this).val() == 1) {
            _t.show();
        } else {
            _t.hide();
            _t.find('input').each(function(){
               $(this).val('');
            })
        }
    });
    $(function () {
        userAddrEditInit();
    })
</script>
{/block}
{block name="js"}
<script type='text/javascript' src='__STYLE__/users/invoices/invoices.js?v={$v}'></script>
<script type="text/javascript" src="__STATIC__/plugins/validator/jquery.validator.min.js?v={$v}"></script>
{/block}


<script>



</script>